import {request} from '@/utils/request/request';
// import type {} from './dict.service.d';
const prefix = '/system/dict';

// 查询字典数据列表
export function dictDataListGET(queryParams: any) {
  return request.get<any>({
    url: `${prefix}/data/list`,
    params: queryParams,
  });
}

// 查询字典数据详细
export function dictDataGET(dictCode: number) {
  return request.get<any>({
    url: `${prefix}/data/${dictCode}`,
  });
}

// 根据字典类型查询字典数据信息
export function dictDataTypeGET(dictType: number) {
  return request.get<any>({
    url: `${prefix}/data/type/${dictType}`,
  });
}

// 新增字典数据
export function dictDataPOST(dataParams: any) {
  return request.post<any>({
    url: `${prefix}/data`,
    data: dataParams,
  });
}

// 修改字典数据
export function dictDataPUT(dataParams: any) {
  return request.put<any>({
    url: `${prefix}/data`,
    data: dataParams,
  });
}

// 删除字典数据
export function dictDataDELETE(dictCode: number) {
  return request.delete<any>({
    url: `${prefix}/data/${dictCode}`,
  });
}
